package com.jsbs.iam.ident.mapper;
import com.jsbs.iam.ident.entity.IamMultideviceStrategy;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IamMultideviceStrategyMapper {
    int deleteByPrimaryKey(@Param("list") List<String> list,@Param("companyCode") String companyCode);

    int insert(IamMultideviceStrategy record);

    int insertSelective(IamMultideviceStrategy record);

    IamMultideviceStrategy selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(IamMultideviceStrategy record);

    int updateByPrimaryKey(IamMultideviceStrategy record);

    /**
     * 查询多设备策略
     * @return
     */
    List<IamMultideviceStrategy> getIamMultiDeviceStrategyAll(@Param("strategyNameOrCode") String strategyNameOrCode,
                                                              @Param("companyCode") String companyCode);

    /**
     * 异常登陆策略编码自增
     * @return
     */
    Integer getIamMultiDeviceStrategyCode ();

    /**
     * 根据异常登录策略名称查询
     * @param multiDeviceSStrategyName
     * @return
     */
    IamMultideviceStrategy getMultiDeviceSStrategyName (@Param("multiDeviceSStrategyName") String multiDeviceSStrategyName);

    /**
     * 根据应用类型编码查询
     * @param applyTypeCode
     * @return
     */
    IamMultideviceStrategy getApplyTypeCode (@Param("applyTypeCode") String applyTypeCode);
}